#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

int main()
{
  pid_t child_pid;
  printf("Parent PID: %d\n",getpid());
  switch (child_pid = fork()) {
  case -1:
    printf("Failed to fork\n");
  case 0:
    printf("Child PID: %d\n",getpid());
    sleep(10);
    _exit(EXIT_SUCCESS);
  default:
    sleep(30);
    exit(EXIT_SUCCESS);
  }
}
